<%= error_messages_for :purchase %>

<% form_for(:purchase, :url => purchases_path) do |f| %>
  <%= render :partial => 'form', :locals => {:f => f} %>
  <%= render :partial => 'purchase_item/form', :collection => @purchase.purchase_items %>
<% end %>

<%= link_to 'Back', purchases_path %>
